1. Field of the Invention
The present invention relates in general to a computer storage system and method. In particular, the invention relates to a technique for secure storage within a data storage system or subsystem including a host CPU and a non-volatile storage (NVS) memory and also to a method of securely storing data in the system.
2. Background of the Invention
The fundamental structure of a modern computer includes a data storage system or subsystem including a host central processing unit (CPU) and a secondary storage device, such as a non-volatile storage (NVS) memory. Methods and systems for storing and managing data between the host CPU and the NVS memory have been proposed.
In the conventional systems or subsystems, a failure due to data corruption resulting from an error in a write operation can cause the write operation to be nullified. In addition, in the conventional systems or subsystems, the loss of power during a write operation can cause the data in the non-volatile storage memory to be overwritten or destroyed.
The above problems can be demonstrated in a conventional computer storage system shown in FIG. 1. FIG. 2 is a flowchart of the process of writing data to a non-volatile storage (NVS) memory. The system has a host central processing unit (CPU), a host adapter (HA), a NVS Space Manager (NSM), and the NVS memory. The NVS memory has a control block space to receive the characteristics of the data, such as its address, length, sequence, etc. The NVS memory also has a write data space to receive the data. The process of writing data is as follows:
1) HA sends a Write request to NSM. PA1 2) NSM allocates the control block space and write data space of the NVS memory. PA1 3) NSM updates a control block in a track slot of the control block space of the NVS memory. PA1 4) NSM informs HA to use the track slot in the control block space of the NVS memory. PA1 5) HA transfers data to the write data space of the NVS memory. PA1 6) HA signals Write-operation complete to Host CPU. PA1 7) Host CPU acknowledges receipt of the Write-Operation complete. PA1 8) HA updates the control block space of the NVS memory.
It is apparent that data in the NVS memory can be overwritten or destroyed in case of write aborts due to the power loss or errors during or after step 5). The crossed-out portions of the storing slots in the write data space of the NVS memory illustrate the overwritten or destroyed data. Thus, it is apparent that a need exists for an improved computer storage system which can securely store data and prevent the data from being overwritten or destroyed due to the loss of power, or errors occurred during the storing process.
One solution to the problem is to disallow NVS updates until the current data in the NVS memory is destaged to disk or other storage devices. This solution significantly degrades the performance of the system. A second solution to the problem is to allocate additional write data space and control block space in the NVS memory, for example, holding both copy n and copy n-1 of the write data. The second solution would increase the NVS memory overhead, both size and cost. Further, the second solution would increase complexity to the process during the power loss as synchronizing step 8) is complicated.
Another problem of the conventional computer storage system is that a battery is implemented to support the system when the power is down. The longer the power is down, the higher the capacity of the battery is required. It is very expensive to have a high capacitated battery. Furthermore, no matter how high the capacity is, there is a limit of the power down time.
Therefore, there is a need for an improved computer storage system which can securely store data and prevent the data from being overwritten or destroyed due to the loss of power, or errors occurred during the storing process without being significantly penalized in other ways. Further, there is a need for an improved computer storage system which is arranged and configured to reduce the cost of backup power source when the power is down without losing any data.